home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmSysInfo
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Double
- Caption = "System Info - Ver 1.1"
- ClientHeight = 3900
- ClientLeft = 1305
- ClientTop = 2055
- ClientWidth = 5760
- Height = 4305
- Left = 1245
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3900
- ScaleWidth = 5760
- Top = 1710
- Width = 5880
- Begin CommandButton ExitButton
- Caption = "&OK"
- Default = -1 'True
- Height = 375
- Index = 0
- Left = 4770
- TabIndex = 22
- Top = 195
- Width = 885
- End
- Begin SSFrame Frame3D2
- Caption = "System Info"
- ForeColor = &H00000000&
- Height = 2535
- Left = 120
- TabIndex = 5
- Top = 1250
- Width = 4485
- Begin SSPanel DOSVer
- Alignment = 1 'Left Justify - MIDDLE
- BevelOuter = 1 'Inset
- ForeColor = &H00000000&
- Height = 255
- Left = 3820
- TabIndex = 20
- Top = 250
- Width = 525
- End
- Begin SSPanel WinPaging
- Alignment = 1 'Left Justify - MIDDLE
- BevelOuter = 1 'Inset
- ForeColor = &H00000000&
- Height = 255
- Left = 1650
- TabIndex = 18
- Top = 900
- Width = 2700
- End
- Begin SSPanel WinVer
- Alignment = 1 'Left Justify - MIDDLE
- BevelOuter = 1 'Inset
- ForeColor = &H00000000&
- Height = 255
- Left = 1650
- TabIndex = 16
- Top = 250
- Width = 525
- End
- Begin SSPanel CpuType
- Alignment = 1 'Left Justify - MIDDLE
- BevelOuter = 1 'Inset
- ForeColor = &H00000000&
- Height = 255
- Left = 1650
- TabIndex = 14
- Top = 1230
- Width = 2700
- End
- Begin SSPanel FreeRes
- Alignment = 1 'Left Justify - MIDDLE
- BevelOuter = 1 'Inset
- ForeColor = &H00000000&
- Height = 255
- Left = 1650
- TabIndex = 12
- Top = 2190
- Width = 2700
- End
- Begin SSPanel CoProc
- Alignment = 1 'Left Justify - MIDDLE
- BevelOuter = 1 'Inset
- ForeColor = &H00000000&
- Height = 255
- Left = 1650
- TabIndex = 10
- Top = 1860
- Width = 2700
- End
- Begin SSPanel WinMode
- Alignment = 1 'Left Justify - MIDDLE
- BevelOuter = 1 'Inset
- ForeColor = &H00000000&
- Height = 255
- Left = 1650
- TabIndex = 7
- Top = 570
- Width = 2700
- End
- Begin SSPanel FreeMem
- Alignment = 1 'Left Justify - MIDDLE
- BevelOuter = 1 'Inset
- ForeColor = &H00000000&
- Height = 255
- Left = 1650
- TabIndex = 6
- Top = 1545
- Width = 2700
- End
- Begin Label Label8
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Caption = "DOS Ver:"
- Height = 180
- Index = 1
- Left = 2950
- TabIndex = 21
- Top = 255
- Width = 840
- End
- Begin Label vm
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Caption = "Virtual Memory:"
- Height = 180
- Left = 90
- TabIndex = 19
- Top = 945
- Width = 1550
- End
- Begin Label Label8
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Caption = "Win Ver:"
- Height = 180
- Index = 0
- Left = 90
- TabIndex = 17
- Top = 270
- Width = 1550
- End
- Begin Label Label7
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Caption = "Processor Type:"
- Height = 180
- Left = 90
- TabIndex = 15
- Top = 1230
- Width = 1550
- End
- Begin Label Label6
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Caption = "Free Resources:"
- Height = 180
- Left = 90
- TabIndex = 13
- Top = 2190
- Width = 1550
- End
- Begin Label Label5
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Caption = "Coprocessor:"
- Height = 180
- Left = 90
- TabIndex = 11
- Top = 1860
- Width = 1550
- End
- Begin Label Label4
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Caption = "Windows Mode:"
- Height = 180
- Left = 90
- TabIndex = 9
- Top = 615
- Width = 1550
- End
- Begin Label Label3
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Caption = "Free Memory:"
- Height = 180
- Left = 90
- TabIndex = 8
- Top = 1545
- Width = 1550
- End
- End
- Begin SSFrame Frame3D1
- Caption = "Windows Dirs."
- ForeColor = &H00000000&
- Height = 1035
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 4485
- Begin SSPanel WinSysDir
- Alignment = 1 'Left Justify - MIDDLE
- BevelOuter = 1 'Inset
- ForeColor = &H00000000&
- Height = 255
- Left = 1300
- TabIndex = 2
- Top = 585
- Width = 3000
- End
- Begin SSPanel WinDir
- Alignment = 1 'Left Justify - MIDDLE
- BevelOuter = 1 'Inset
- ForeColor = &H00000000&
- Height = 255
- Left = 1300
- TabIndex = 1
- Top = 270
- Width = 3000
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Caption = "System Dir:"
- Height = 200
- Left = 70
- TabIndex = 4
- Top = 610
- Width = 1170
- End
- Begin Label Label1
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Caption = "Windows Dir:"
- Height = 200
- Left = 70
- TabIndex = 3
- Top = 300
- Width = 1170
- End
- End
- Option Explicit
- Declare Function GetDriveType Lib "Kernel" (ByVal nDrive As Integer) As Integer
- Declare Function GetTempDrive Lib "Kernel" (ByVal cDriveLetter As Integer) As Integer
- Declare Function GetEnvironment Lib "GDI" (ByVal lpPortName As String, lpEnviron As Any, ByVal nMaxCount As Integer) As Integer
- Declare Function GetDOSEnvironment Lib "Kernel" () As Long
- Declare Function GetDeviceCaps Lib "GDI" (ByVal hDC As Integer, ByVal nIndex As Integer) As Integer
- Declare Function GetWindowsDirectory Lib "Kernel" (ByVal lpBuffer As String, ByVal nSize As Integer) As Integer
- Declare Function GetSystemDirectory Lib "Kernel" (ByVal lpBuffer As String, ByVal nSize As Integer) As Integer
- Declare Function GetWinFlags Lib "Kernel" () As Long
- Declare Function GetFreeSpace Lib "Kernel" (ByVal wFlags As Integer) As Long
- Declare Function GetFreeSystemResources Lib "User" (ByVal fuSysResource As Integer) As Integer
- Declare Function GetVersion Lib "Kernel" () As Long
- Const WF_STANDARD = &H10
- Const WF_ENHANCED = &H20
- Const WF_80x87 = &H400
- Const WF_CPU286 = &H2
- Const WF_CPU386 = &H4
- Const WF_CPU486 = &H8
- Const WF_PAGING = &H800
- Const GFSR_GDIRESOURCES = &H1
- Const GFSR_SYSTEMRESOURCES = &H0
- Const GFSR_USERRESOURCES = &H2
- Function DosVersion ()
- Dim Ver As Long
- Dim DOSVer As Long
- Ver = GetVersion()
- DOSVer = Ver \ &H10000
- DosVersion = Format((DOSVer \ 256) + ((DOSVer Mod 256) / 100), "Fixed")
- End Function
- Sub ExitButton_Click (Index As Integer)
-
- Unload Me
- End Sub
- Sub Form_Load ()
- Dim WinFlags As Long
- Dim x As Long
- Dim Mode As String, Processor As String
- ' Center the form
- Me.Left = (Screen.Width / 2) - (frmSysInfo.Width / 2)
- Me.Top = (Screen.Height / 2) - (frmSysInfo.Height / 2)
- WinDir.Caption = GetWindowsDir()
- WinSysDir.Caption = GetWindowsSysDir()
- WinFlags = GetWinFlags()
- If WinFlags And WF_ENHANCED Then
- Mode = "386 Enhanced Mode"
- Else
- Mode = "Standard Mode"
- vm.Enabled = False
- WinPaging.Enabled = False
- End If
- WinMode.Caption = Mode
- If WinFlags And WF_80x87 Then Processor = "Present" Else Processor = "None"
- CoProc.Caption = Processor
- x = GetFreeSpace(0)
- FreeMem.Caption = Format$(x / 1024, "##") + " KB"
- If WinFlags And WF_CPU286 Then
- CpuType.Caption = "80286"
- ElseIf WinFlags And WF_CPU386 Then
- CpuType.Caption = "80386"
- ElseIf WinFlags And WF_CPU486 Then
- CpuType.Caption = "80486"
- Else
- CpuType.Caption = "Unknown Processor"
- End If
- If WinFlags And WF_PAGING Then
- WinPaging.Caption = "Enabled"
- Else
- WinPaging.Caption = "Disabled"
- End If
- FreeRes.Caption = "System:" & Format$(GetFreeSystemResources(GFSR_SYSTEMRESOURCES)) & " GDI:" + Format$(GetFreeSystemResources(GFSR_GDIRESOURCES)) & " USER:" & Format$(GetFreeSystemResources(GFSR_USERRESOURCES))
- WinVer.Caption = WindowsVersion()
- DOSVer.Caption = DosVersion()
- End Sub
- Function GetWindowsDir () As String
- Dim Temp$
- Dim x As Integer
- Temp$ = String$(145, 0)
- x = GetWindowsDirectory(Temp$, 145)
- Temp$ = Left$(Temp$, x)
- If Right$(Temp$, 1) <> "\" Then
- GetWindowsDir$ = Temp$ + "\"
- Else
- GetWindowsDir$ = Temp$
- End If
- End Function
- Function GetWindowsSysDir () As String
- Dim Temp$
- Dim x As Integer
- Temp$ = String$(145, 0)
- x = GetSystemDirectory(Temp$, 145)
- Temp$ = Left$(Temp$, x)
- If Right$(Temp$, 1) <> "\" Then
- GetWindowsSysDir$ = Temp$ + "\"
- Else
- GetWindowsSysDir$ = Temp$
- End If
- End Function
- Function WindowsVersion ()
- Dim Ver As Long
- Dim WinVer As Long
- Ver = GetVersion()
- WinVer = Ver And &HFFFF&
- WindowsVersion = Format((WinVer Mod 256) + ((WinVer \ 256) / 100), "Fixed")
- End Function
-